USE [NLKHCNData_Prod]
GO

/****** Object:  View [dbo].[ChuyenGiaDetailView]    Script Date: 12/29/2014 10:29:25 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


ALTER VIEW [dbo].[ChuyenGiaDetailView]
AS
SELECT        CG.NamSinh, CG.DanToc, CG.DiaChi, CG.Id, CG.HoTen, CG.GioiTinh, CG.DienThoai, CG.Email, CG.NamHocHam, CG.ChucVu, CG.ChucDanh, CG.TenDonVi, 
                         CG.DiaChiDonVi, CG.DienThoaiDonVi, CG.NgoaiNgu, CG.NamHocVi, CG.TenLuanAn, CG.ThanhTuuKhcnKhac, CG.CongKhai, HH.Ten AS TenHocHam, 
                         HV.Ten AS TenHocVi, LV.Ten AS TenLinhVuc, LV.NhomLinhVucId, CN.Ten AS TenChuyenNganh, HTDT.Ten AS TenHinhThucDaoTao, CSDT.Ten AS TenCoSoDaoTao, 
                         QG.Ten AS TenQuocGia
FROM            dbo.ChuyenGia AS CG LEFT OUTER JOIN
                         dbo.HocHam AS HH ON CG.HocHamId = HH.Id LEFT OUTER JOIN
                         dbo.HocVi AS HV ON CG.HocViId = HV.Id LEFT OUTER JOIN
                         dbo.LinhVuc AS LV ON CG.LinhVucId = LV.Id LEFT OUTER JOIN
                         dbo.ChuyenNganh AS CN ON CG.ChuyenNganhId = CN.Id LEFT OUTER JOIN
                         dbo.HinhThucDaoTao AS HTDT ON CG.HinhThucDaoTaoId = HTDT.Id LEFT OUTER JOIN
                         dbo.CoSoDaoTao AS CSDT ON CG.CoSoDaoTaoId = CSDT.Id LEFT OUTER JOIN
                         dbo.QuocGia AS QG ON CG.QuocGiaId = QG.Id


GO


